<style>
    #VIEW-login {
        height: 100%;
        background: #252834;
        padding-top: 1px;
        margin-top: -1px;
    }

    #VIEW-login .layui-logo {
        user-select: none;
        overflow: hidden;
        position: static;
        font-size: 30px;
        color: #d6e0f6;
        width: 100%;
        padding: 0;
        line-height: 120px;
        height: 120px;
        color: #3491ff;
        font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
        transition: height .8s cubic-bezier(0.075, 0.82, 0.165, 1);
    }

    #VIEW-login .layui-logo span {
        font-weight: normal;
        color: #fff;
        border-bottom: 1px solid #3491ff;
    }

    #VIEW-login .layui-logo span b {
        color: #3491ff;
    }

    #VIEW-login .login-wrap {
        position: relative;
        top: 50%;
        margin-top: -290px;
        height: 540px;
    }

    #VIEW-login .layui-form {
        overflow: hidden;
        background: #fff;
        padding: 40px;
        padding-bottom: 20px;
        border-radius: 0px;
        box-shadow: 0 0 30px #000;
        position: relative;
    }

    #VIEW-login .layui-form-item {
        position: relative;
    }

    #VIEW-login .verify-block {
        display: none;
    }

    #VIEW-login .layui-input {
        text-indent: 26px;
    }


    #VIEW-login .houseimg img {
        display: inline-block;
        margin-top: 5%;
    }

    #VIEW-login .login-type-tab {
        margin-bottom: 20px;
        overflow: hidden;
    }

    #VIEW-login .login-type-tab li {
        display: inline-block;
        padding-right: 20px;
        font-size: 16px;
        line-height: 30px;
        color: #bbb;
        transition: color .5s ease;
    }

    #VIEW-login .layui-form-item .label-icon {
        position: absolute;
        top: 0;
        left: 0;
        width: 38px;
        line-height: 38px;
        text-align: center;
        color: #d2d2d2 !important;
    }

</style>
<div id="VIEW-login" lay-title="登录">
    <div class="login-wrap">
        <div class="layui-container">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 nepadmin-tc">
                    <div class="layui-logo"><span>Ne<b>pA</b>dmin</span></div>
                </div>
                <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4">
                    <div class="layui-form" lay-filter="login-form">
                        <ul class="login-type-tab">
                            <li  >找回密码</li>
                        </ul>

                        <div class="layui-form-item">
                            <label class="layui-icon label-icon layui-icon-username"></label>
                            <input type="text" name="loginName" lay-verify="required" lay-verType="tips" placeholder="账号" autocomplete="off" class="layui-input">
                        </div>

                        <div class="normal-login-form">
                            <div class="layui-form-item">
                                <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit lay-filter="login-submit">
                                    <i style="display: none" class="layui-icon layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"></i>
                                    立即修改
                                </button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use(['jquery', 'admin', 'form','layer'], function () {
        var $ = layui.jquery
                , layer = layui.layer
                , form = layui.form
                , admin = layui.admin;

        form.render(null, 'form-group');

        /* 监听提交 */
        form.on('submit(login-submit)', function (data) {
            var loading = $(this).find('.layui-icon');
            if (loading.is(":visible")) return;
            loading.show();

            var field = data.field;
            var username = field.loginName;
            admin.post({
                url: '/sysUser/mail/'+username+"?_method=PUT",
                success: function (res) {
                    loading.hide();
                    if (res.code == 0) {
                        //admin.login(res.token, {user: res.user}, data.field.autoLogin != 'on');
                        //admin.navigate('/');
                        layer.msg(res.msg);
                    } else {
                        layer.msg(res.msg);
                    }
                },
                complete: function () {
                    loading.hide();
                }
            });
            return false;
        });
    });
</script>